Cleanup: dead code, flatten PARAMETER_SOURCE_MAP, + cleanup backlog doc#103
Merged
Merged
Conversation
…backlog
Adds docs/cleanup-todo.md (a tiered cleanup backlog from a code-analysis pass)
and executes its Tier 1 (dead/commented code) plus items 2.1 and 2.2.
Dead / commented-out code removed:
- backend/unifier.py: commented _perister_factory / _unify_wrapper blocks; also
`type(x) == list` -> `isinstance` (2.2).
- backend/config.py: commented pods wiring in all_site_sources.
- frontend/api/app.py: commented create_queue, stale cache-check and Cloud Tasks
payload comments, a debug print, the always-None task_id/name path, and the
unused ConfigModel.sources field (accepted on POST, never read).
- orchestration/definitions.py: _all_specs dropped from _build_graph's return —
it was returned but never used.
- orchestration/resources/die_config.py: the output_type -> is_summary /
output_format mapping is now dead — the source asset always passes a nominal
ogc_timeseries synth product and unify_source_both produces both modes, so the
config carries no output mode. Simplified the payload + docstring accordingly.
- backend/worker.py, backend/record.py, backend/logger.py, frontend/cli.py:
misc commented-out lines.
2.1 — Flatten PARAMETER_SOURCE_MAP from `param: {"agencies": [...]}` to
`param: [...]`. "agencies" was the only key ever present and every read was
`["agencies"]`; updated the two read sites (config.py, products.py) and the two
registry/validation tests.
No behavior change. Full suite (311) + dg check defs clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Your pull request is automatically being deployed to Dagster Cloud.
|
This was referenced Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
docs/cleanup-todo.md(a tiered cleanup backlog from a code-analysis sweep of backend + frontend + orchestration) and executes its Tier 1 (dead/commented code) plus 2.1 and 2.2.Stacked on #102 (base
feature/source-registry) because item 2.1 updates the registry/validation tests added in #101/#102. Merge order: #101 → #102 → this.Dead / commented-out code removed
backend/unifier.py— commented_perister_factory/_unify_wrapper;type(x) == list→isinstance(2.2).backend/config.py— commentedpodswiring inall_site_sources.frontend/api/app.py— commentedcreate_queue, stale cache/Cloud-Tasks payload comments, debugprint, the always-Nonetask_id/namepath, and the unusedConfigModel.sourcesfield (accepted on POST, never read).orchestration/definitions.py—_all_specsdropped from_build_graph's return (returned, never used).orchestration/resources/die_config.py— theoutput_type → is_summary / output_formatmapping is now dead: the source asset always passes a nominalogc_timeseriessynth product andunify_source_bothproduces both modes, so the config carries no output mode. Simplified payload + docstring. (Also why the missingogc_hardness/ogc_water_typethere was harmless — the whole block is gone.)backend/worker.py,backend/record.py,backend/logger.py,frontend/cli.py— misc commented lines.2.1 — Flatten
PARAMETER_SOURCE_MAPparam: {"agencies": [...]}→param: [...]."agencies"was the only key ever present and every read was["agencies"]. Updated the two read sites (config.py,products.py) and the two tests.Verification
No behavior change. Full suite 311 passed;
dg check defsclean.py_compileover the API files (not import-tested in CI) clean.Remaining backlog (Tier 2.3–2.7, Tier 3, Tier 4) tracked in
docs/cleanup-todo.md.🤖 Generated with Claude Code